// PartAttach.h: interface for the PartAttach class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PARTATTACH_H__83CE4275_DDA7_4D28_BDD9_639207EE5067__INCLUDED_)
#define AFX_PARTATTACH_H__83CE4275_DDA7_4D28_BDD9_639207EE5067__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Part.h"

class DllExport PartAttach : public Part  
{
public:
	PartAttach();
	virtual ~PartAttach();

public:
	virtual BOOL Accept(ModelVisitor* pVisitor);

public:
	void SetDiameter(DOUBLE dbDiameter){
		ChangeStateInSetFunction(m_dbDiameter, dbDiameter);
		SetVariableValue(_T("size2"), dbDiameter);
		m_dbDiameter = dbDiameter;
	}

	DOUBLE GetDiameter(){
		DOUBLE dbTemp = 0.0;
		if(GetVariableValue(_T("size2"), dbTemp))
			return dbTemp;
		return m_dbDiameter;
	}
	
	void SetDH(INT nDH){
		SetVariableValue(_T("DH"), nDH);
		m_nDH = nDH;
	}

	INT GetDH(){
		INT nTemp = 0;
		if(GetVariableValue(_T("DH"), nTemp))
			return nTemp;
		return m_nDH;
	}

private:
	DOUBLE m_dbDiameter;
	INT m_nDH;
};

#endif // !defined(AFX_PARTATTACH_H__83CE4275_DDA7_4D28_BDD9_639207EE5067__INCLUDED_)
